dnd: Add another assertion
authorMatthias Clasen <mclasen@redhat.com>
Sat, 19 Jun 2021 14:49:04 +0000 (07:49 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 19 Jun 2021 14:50:41 +0000 (07:50 -0700)
Assert that gdk_drop_finish() is called after the
drop is performed.

gdk/gdkdrop.c

index 0825df69d264abb3d30f8b186e4e32c318afc88a..37a63c5a7b553a5efd712c07da8c2cc96d862de8 100644 (file)
@@ -294,8 +294,11 @@ gdk_drop_finalize (GObject *object)
 
   /* someone forgot to send a LEAVE signal */
   g_warn_if_fail (!priv->entered);
+
   /* Should we emit finish() here if necessary?
-   * For now that's the backends' job */
+   * For now that's the backends' job
+   */
+  g_warn_if_fail (priv->state != GDK_DROP_STATE_DROPPING);
 
   g_clear_object (&priv->device);
   g_clear_object (&priv->drag);